package com.jgame.secondarymarket.interfaces.dto.product;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @title: SpecificationDTO
 * @Author Wangsj
 * @Date: 2021/7/21
 */
@Data
@ApiModel(description = "商品规格")
public class SpecificationDTO {

    @ApiModelProperty(value = "商品规格名称")
    @NotNull(message = "商品规格名称不能为空")
    private String tage;

    @ApiModelProperty(value = "商品规格描述")
    @NotNull(message = "商品规格描述不能为空")
    private String value;

    @ApiModelProperty(value = "商品规格价格")
    @NotNull(message = "商品价格不能为空")
    @Min(value = 0, message = "商品最低价为0")
    private BigDecimal price;

    @ApiModelProperty(value = "商品规格图片地址")
    @NotNull(message = "商品图片不能为空")
    private String imageAddress;

    @ApiModelProperty(value = "商品规格描述")
    private String describes;
}
